package com.ruoyi.controller.system;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.controller.BaseController;
import com.ruoyi.domain.SysNotice;
import com.ruoyi.service.SysNoticeService;

@RequestMapping("system/notice")
@RestController
public class SysNoticeController extends BaseController{
	
	@Autowired
	private SysNoticeService sysNoticeService;
	
	
	/**
	 * 通知公告
	 * @param notice
	 * @return
	 */
	@GetMapping("list")
	public TableDataInfo list(SysNotice notice) {
		logger.info("通知公告,notice:{}",notice);
		List<SysNotice> list = sysNoticeService.selectNoticeList(notice);
		return getDataTable(list);
	}
}
